GNUH8 v0601

February 1st, 2006

KPIT Cummins Info systems Limited is now releasing GNUH8 v0601, a cross compiler toolchain for Renesas (formerly Hitachi) H8 series of microcontrollers.

SALIENT FEATURES:

1.

GNUH8 v0601 is based on gcc-4.0.2, binutils-2.16.1 and newlib-1.12.0.

2.

The latest patches have been applied to the gcc, binutils and newlib.

3. An Optimized library has been provided with this toolchain for H8 target. To use this optimized library on command line; pass the option "-loptm" instead of "-lm" and "-loptc" instead of "-lc".
In HEW, select "Use  optimized library" at the location Linker->Input to use optimized library.
4. The generic option -fsort-data is implemented to sort variables and constants based on their alignment which gets enabled with -Os switch.
5. GCC code creates sections ".tinyrodata",".tinydata" and ".tinybss" upon passing a target specific option
"-mtinydata " on the command line.
6.

Support for HEW4

                Please refer to the FAQ for details of the patches applied to the sources.
                http://www.kpitgnutools.com/phpmyfaq/index.php?sid=16957&aktion=artikel&rubrik=001005&id=42&lang=en

ABOUT GNUH8 v0601:

Release version: GNUH8 v0601
Release Date: February 1st, 2006
Platforms Supported: Red Hat GNU/Linux v8.0 or later (or compatible distribution)
Windows 9X/NT/2000/XP/ME
Languages: C, C++
H8 Series: H8/300,
H8/300L,
H8/300H,
H8/300H Tiny Series,
H8/S 2XXX,
H8/S 26XX,
H8/SX (ELF)
Object File Formats: ELF, COFF
Please register at http://www.kpitgnutools.com for free technical support.
Please contact http://www.kpitgnutools.com/feedback.php for any feedback or suggestions.

CHANGES IN THIS RELEASE:
This section summarizes the major changes as compared to GNUH8 v0601.

BINUTILS:
1 The Linker is modified to incorporate the sections ".tinyrodata" ,".tinydata" and ".tinybss" in the appropriate H8 memory regions for storing the global variables depending upon whether the variable is constant, initialized or uninitialized respectively.
GCC:
1 The instruction mov.l er7, @-er7 pushed decremented er7 to stack in h8tiny.
This has been fixed.

HEW (For Windows OS only):

1.

A new option for using "Optimized Libraries" has been added for GNUH8 target.
This option can be selected/deselected even after creation of project.

2.

GNU Map Viewer is a GUI based viewing tool (for windows OS only). GNU Map viewer is integrated with HEW and will get installed with the toolchain.

        Features of GNU Map Viewer:

 
a.

KPIT GNU MapViewer-1.0 is compatible with Windows 9x and above.

b.

Supports GNU map files only.

c.

Targets(SH/H8/M16C/other) and format(elf/coff) recognition.

Known problems:

We intend to fix the known problems in our future releases.
We also release Maintenance Packs for critical bugs fixed in between releases.

H8-COFF and H8-ELF:

Windows:
1.

Windows 9X has restriction on the length of command line that can be given. Due to this,

 
a.

When the tool chain shortcut from 'Start' menu is invoked, the relevant batch file may not be found and Windows 9X may display an error.

b.

In HEW (High-performance Embedded Workshop), this restriction may cause problems during linking.

       Please refer to the following link for further details on this.
http://www.kpitgnutools.com/phpmyfaq/index.php?sid=2884&aktion=artikel&rubrik=001006&id=151&lang=en 

Windows and GNU/Linux:
1.

Assembler gives error while building the following code with optimization enabled,

unsigned long x[4];
void foo(void)
{
((void (*)())(x+2))();
}

2.

Following code produces Internal Compiler Error,
void set_bit(int nr, char * addr)
{
__asm__("bset %w1,%0":"=m"(*addr) :"g"(nr),"m"(*addr));
}

3.

Following code if compiled for H8300H, H8300HN, H8S, H8300SN, H8SX, H8SXN 
targets with optimization option -O1 and above, generates wrong assembly code

unsigned int ReadWordx86Style(unsigned long lAddr)
{
unsigned char baBuff[2];
baBuff[0x00]=*((unsigned char *)((unsigned int)(lAddr+1)));
baBuff[0x01]=*((unsigned char *)((unsigned int)(lAddr+0)));
return((*(unsigned int *)baBuff));
}

int start(void)
{
unsigned char baBuff[256];
unsigned int wResult;
wResult = ReadWordx86Style((unsigned long)((unsigned int)baBuff));
return(wResult);
}

4.

The assembler option "-al=" which is used to generate list file gives the following error, "option `-alternate' doesn't allow an argument".

5.

The ".tinybss" implementation does not work as expected.

H8-ELF:

Windows and GNU/Linux:
1.

h8300-elf-as does not give error if attribute of a section is not specified.

H8-COFF:

Windows and GNU/Linux:
1.

The following code gives error 'Too many new sections; can't add ".bss.w35"' when "-fno-common" and
"-fdata-sections" options passed together.

unsigned int w00, w01, w02, w03, w04, w05, w06, w07, w08, w09, w10, w11, w12,
w13, w14, w15, w16, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w27, w28,
w29, w30, w31, w32, w33, w34, w35, w36, w37, w38, w39; 
int main(void){ }

HEW:

1.

"Warning Options" and "Other Compiler Options" do not get included while generating makefile for any reopened project.

Workaround for this:

Go to "Compiler" option once and click "OK". Now the make file will be generated with all the selected options.

NOTE:

Windows and GNU/Linux:
1.

Some of the ANSI C library functions are not implemented in H8 optimized  library; their implementation is kept reserved for future releases. The optimized library has not been provided under GNU GPL . The            source code of the optimized library is neither released nor available on request.

2.

Future proposed Enhancements in the map viewer is "Find Utility".

3.

Latest GDB v0502 must be used with v0601 tool chain.